package com.datacloud.controller;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 创建人   caizhongrui
 * 创建时间  下午10:29
 * ==============================================
 * 类说明：
 * <p>
 * ==============================================
 * 修改记录
 * 修改人          修改时间             修改内容
 * 蔡仲瑞          下午10:29             创建
 * ==============================================
 */
@Controller
@RequestMapping("test")
public class DataTestController {



    @RequestMapping(value = "/testData/{company}", method = RequestMethod.GET, produces = "application/json; charset=utf-8")
    @ResponseBody
    public String checkCompany(@PathVariable("company") String company){
        JSONObject result = new JSONObject();
        
        /*JSONObject jsonA = JSONObject.parseObject(jsonStr);
        String tabInfo = jsonA.getString("tablejson");
        JSONArray jsons = JSONArray.parseArray(tabInfo);
        String cginfo = jsonA.getString("searjson");
        JSONObject sp = JSONObject.parseObject(cginfo);
        JSONObject json = jsons.getJSONObject(i);
        //字符串转json对象
        JSONObject jsonOBJ = jsons.getJSONObject(i);
        HyzdhxxsqBean dhxx = JSONObject.toJavaObject(jsonOBJ, HyzdhxxsqBean.class);
        */
        try{
            result.put("success",true);
            result.put("msg",company);
        }catch (Exception e){

        }
        return result.toJSONString();
    }
}
